package metalink.admin;
import java.util.ArrayList;
import model.admin.AdminPlacementMo;
import vo.BatchDetailsVo;
import vo.Placementvo;
import com.opensymphony.xwork2.ActionSupport;


public class GetPlacementDetails extends ActionSupport{
	
/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public ArrayList<Placementvo> placement_list=new ArrayList<Placementvo>();
	public ArrayList<Placementvo> editstudentlist = new ArrayList<Placementvo>();
	public ArrayList<Placementvo> companynamelist= new ArrayList<Placementvo>();
	
	int student_id;
	int batch_id;
	
	
	public ArrayList<Placementvo> getCompanynamelist() {
		return companynamelist;
	}


	public void setCompanynamelist(ArrayList<Placementvo> companynamelist) {
		this.companynamelist = companynamelist;
	}


	public ArrayList<Placementvo> getEditstudentlist() {
		return editstudentlist;
	}


	public void setEditstudentlist(ArrayList<Placementvo> editstudentlist) {
		this.editstudentlist = editstudentlist;
	}


	public int getStudent_id() {
		return student_id;
	}


	public void setStudent_id(int student_id) {
		this.student_id = student_id;
	}


	public ArrayList<Placementvo> getPlacement_list() {
		return placement_list;
	}


	public void setPlacement_list(ArrayList<Placementvo> placement_list) {
		this.placement_list = placement_list;
	}




	public int getBatch_id() {
		return batch_id;
	}


	public void setBatch_id(int batch_id) {
		this.batch_id = batch_id;
	}


	public String execute(){
		AdminPlacementMo mo= new AdminPlacementMo();
		if(student_id==0){
		placement_list=mo.getPlacementdetails(batch_id);
		}
		else if (batch_id==0){
			companynamelist=mo.getCompanyplacementNameList(student_id);
			editstudentlist=mo.editstudentcompany(student_id);
			
		}
		else{
			System.out.println("None is True!! Error here");
		}
		return SUCCESS;
	}

}
